package com.sh169.pojos;

import java.util.Date;
import java.util.List;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.Many;
import org.nutz.dao.entity.annotation.Table;
@Table("sh_order")
public class Order extends BasePojo{

	private static final long serialVersionUID = 6549582436889692942L;
	public static short STATE_NEW = 0; // 新订单
	public static short STATE_PROCESS = 1; // 正在处理
	public static short STATE_CHECKOUT = 2; // 已付款
	public static short STATE_SEND = 3;  // 已发货
	public static short STATE_FINISH = 4; // 完成
	@Id
	@Column
	private int id;
	@Column
	private int userid;
	@Column
	private float price;
	@Column
	private short state;
	@Column
	private String address;
	@Column
	private String man;
	@Column
	private String tip;
	@Column
	private Date createtime;
	@Column
	private String phone;
	@Many(target=OrderInfo.class,field="orderid")
	private List<OrderInfo> orderInfos;
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getUserid() {
		return userid;
	}
	public void setUserid(int userid) {
		this.userid = userid;
	}
	public float getPrice() {
		return price;
	}
	public void setPrice(float price) {
		this.price = price;
	}
	public short getState() {
		return state;
	}
	public void setState(short state) {
		this.state = state;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getMan() {
		return man;
	}
	public void setMan(String man) {
		this.man = man;
	}
	public String getTip() {
		return tip;
	}
	public void setTip(String tip) {
		this.tip = tip;
	}
	public Date getCreatetime() {
		return createtime;
	}
	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public List<OrderInfo> getOrderInfos() {
		return orderInfos;
	}
	public void setOrderInfos(List<OrderInfo> orderInfos) {
		this.orderInfos = orderInfos;
	}
	
}
